package com.qy.mybatisplus.config;

import com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author HXB
 * @Title:
 * @Package
 * @Description:
 * @date 2019-12-1011:15
 */
@EnableTransactionManagement
@Configuration
public class MybatisPlusConfig {

    /**
     *   乐观锁
     */
    @Bean
    public OptimisticLockerInterceptor optimisticLockerInterceptor() {
        return new OptimisticLockerInterceptor();
    }
}
